subroutine newton_raphson_1(fungsi, fungsi_aksen, fungsi_double_aksen, x, eps)
	implicit none
	double precision fungsi, fungsi_aksen, fungsi_double_aksen, x, eps, x_lama, selisih, konvergensi
	logical ga_ada_solusi
	integer*2 counter
	counter = 0
	ga_ada_solusi = .false.
	if (fungsi_aksen(x).eq.0) then
		print*, "Turunan Pertama fungsi dengan nilai ", x, " bernilai 0"
	else
		konvergensi = abs((fungsi(x)*fungsi_double_aksen(x))/(fungsi_aksen(x)**2))
		if (konvergensi.lt.1) then
			write (*,98)	
			write (*,99) "i", "x(r)", "|x(r+1)-x(r)|"
			write (*,98)		
			do
				x_lama = x
				if ((fungsi_aksen(x).eq.0)) then
					print*, "Turunan Pertama fungsi dengan nilai ", x, " bernilai 0"
					ga_ada_solusi = .true.
					exit
				end if
				x = x - (fungsi(x)/fungsi_aksen(x))
				selisih = abs(x-x_lama)
				if (counter.eq.0) then
					write (*,100) counter, x_lama, 0
				else
					write (*,100) counter, x_lama, selisih
				end if
				counter = counter + 1
				if (selisih.LT.eps) then
					exit
				end if
			end do
			if (ga_ada_solusi) then
				x = 0
			else
				write (*,98)
			end if
		else
			print*, "Fungsi tidak konvergen"
		end if
	end if
	
98  format(35("-"))		
99  format(3X,A,4X,A,3X,A)
100 format(I4,F10.6,F10.6)
END